﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Gallary.aspx.vb" Inherits="Final_Web_2._0_site_1.Gallary" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   
   
    <p>




        <asp:TextBox ID="TextBox1" runat="server" Width="256px"></asp:TextBox>
&nbsp;<asp:Button ID="Button1" runat="server" Text="Google Image Search" />
    </p>
    <p>




        Unavailable to upload videos to the site, Please therefore use YouTube below.&nbsp;
    </p>
    <p>




        <asp:TextBox ID="TextBox2" runat="server" Width="257px"></asp:TextBox>
&nbsp;<asp:Button ID="Button2" runat="server" Text="YouTube Search" />
    </p>
    <p>




        <asp:ListView ID="ListView1" runat="server" DataKeyNames="ImageID" 
            DataSourceID="GallaryImageSqlDataSource1" GroupItemCount="3">
            <AlternatingItemTemplate>
                <td runat="server" style="background-color: #FFFFFF;color: #000000;">
                   <image src='<%# Eval("ImageLink") %>' style ="width:190px; height:175px;" />
                    <br />
                   Description: <%# Eval("ImageDescription") %>'
                     <br />
                     '<%# Eval("DateUploaded") %>'
                    '<%# Eval("TimeUploaded") %>'
                    <br />
                   Uploaded by: '<%# Eval("UserIDFK") %>'

                   
                </td>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <td runat="server" style="background-color: #848484;">
                    
                     <image src='<%# Eval("ImageLink") %>' style ="width:190px; height:175px;"  />
                    <br />
                   Description: <%# Eval("ImageDescription") %>'
                     <br />
                     '<%# Eval("DateUploaded") %>'
                    '<%# Eval("TimeUploaded") %>'
                    <br />
                   Uploaded by: '<%# Eval("UserIDFK") %>'
                    



                    <br />
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                        Text="Update" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Cancel" />
                    <br />
                </td>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #000000;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
<td runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <InsertItemTemplate>
                <td runat="server" style="">
                 <image src='<%# Eval("ImageLink") %>' style ="width:190px; height:175px;"  />
                    <br />
                   Description: <%# Eval("ImageDescription") %>'
                     <br />
                     '<%# Eval("DateUploaded") %>'
                    '<%# Eval("TimeUploaded") %>'
                    <br />
                   Uploaded by: '<%# Eval("UserIDFK") %>'
                  
                </td>
            </InsertItemTemplate>
            <ItemTemplate>
                <td runat="server" style="background-color: #848484;color:#FFFFFF;">
                     <image src='<%# Eval("ImageLink") %>' style ="width:190px; height:175px;"  />
                    <br />
                   Description: <%# Eval("ImageDescription") %>'
                     <br />
                     '<%# Eval("DateUploaded") %>'
                    '<%# Eval("TimeUploaded") %>'
                    <br />
                   Uploaded by: '<%# Eval("UserIDFK") %>'
                    
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #000000;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" 
                            style="text-align: center;background-color: #848484;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF">
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <td runat="server" 
                    style="background-color: #848484;font-weight: bold;color: #FFFFFF;">
                   
                    <img src='<%# Eval("ImageLink") %>' style ="width:190px; height:175px;" />
                    <br />
                   Description: <%# Eval("ImageDescription") %>'
                     <br />
                     '<%# Eval("DateUploaded") %>'
                    '<%# Eval("TimeUploaded") %>'
                    <br />
                   Uploaded by: '<%# Eval("UserIDFK") %>'
                  

                </td>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="GallaryImageSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MercedesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:MercedesConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ImageID], [ImageLink], [ImageDescription], [DateUploaded], [TimeUploaded], [UserIDFK] FROM [Images]">

        </asp:SqlDataSource>
        <br />
    </p>
    <p>
    </p>
</asp:Content>
